<?php
session_start();
$title="เพิ่มผู้ใช้";
include ('header-admin.php');

$userID=$_SESSION["HBD_USER"];
?>

<div id="center-block" class="main-content">
<img src="img/register.png"/ id="img-block-content">
<div id="content-title-right">
		<h2 class="caption-header">เพิ่มผู้ใช้</h2>
		<span class="caption">สำหรับเพิ่มผู้ใช้งานระบบจัดการ หาดบ้านดินรีสอร์ท</span>
	</div>

	<hr><br><br><br><br><br>
			<div id="center-block-right">
				<form action="doAddUser.php" method="POST" id="booking-form">
				
					<table>
						<tr>
							<td><label for="userlist_username">Username</label></td>
							<td><input type="text" id="userlist_username" name="userlist_username" value="" size="15" class="validate[required,custom[noSpecialCaracters],length[0,20],ajax[ajaxUser]]"/></td>
							<td></td>
						</tr>
						<tr>
							<td><label for="userlist_password">Password</label></td>
							<td><input type="password" id="userlist_password" name="userlist_password" value="" size="15" class="validate[required] text-input"/></td>
							<td></td>
						</tr>
						<tr>
							<td><label for="userlist_repassword">Re-Password</label></td>
							<td><input type="password" id="userlist_repassword" name="userlist_repassword" value="" size="15" class="validate[required,confirm[userlist_password]] text-input"/></td>
							<td></td>
						</tr>
						<tr>
							<td><label for="group_id">กลุ่มผู้ใช้</label></td>
							<td><select name="group_id" id="group_id" style="width: 120px" class="validate[required] text-input">
								   <option value="">---</option>
									<?
									$sql="SELECT * FROM `group` ORDER BY `group_id` ASC";
									$result = mysql_query($sql);	
									while ($rs = mysql_fetch_array($result))
											echo '<option value="' . $rs[group_id] . '">' . $rs[group_name] . '</option>';
									?>
								</select></td>
							<td></td>
						</tr>
						<tr>
							<td><label for="userlist_name">ชื่อ-นามสกุล</label></td>
							<td><input type="text" id="userlist_name" name="userlist_name" value="" size="20" class="validate[required] text-input"/></td>
							<td><input type="text" id="userlist_surname" name="userlist_surname" value="" size="20" class="validate[required] text-input"/></td>
						</tr>
						<tr>
							<td colspan="3"><br/></td>
						</tr>
						<tr>
							<td></td>
							<td><p class="submit"><input type="submit" value="เรียบร้อย" /></p></td>
							<td></td>
						</tr>
					</table>
				</form>
				<br><br>
			</div>
	</div>

<?
include ('footer.php');
?>